{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dataset({\n",
       "    features: ['quiz', 'names', 'knight_knave', 'solution', 'solution_text', 'solution_text_format', 'cot_head', 'cot_repeat_steps', 'cot_foot', 'statements', 'index'],\n",
       "    num_rows: 100\n",
       "})"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import datasets\n",
    "\n",
    "train_ds = datasets.load_dataset('K-and-K/knights-and-knaves','test',split=\"2ppl\")\n",
    "train_ds"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Generating train split: 200 examples [00:00, 39583.84 examples/s]\n",
      "Generating test split: 100 examples [00:00, 10649.23 examples/s]\n"
     ]
    }
   ],
   "source": [
    "kk_dataset =  datasets.load_dataset('K-and-K/knights-and-knaves',data_files={\n",
    "            \"train\": [\"train/people2_num200.jsonl\"],\n",
    "            \"test\": [\"test/people2_num100.jsonl\"],\n",
    "        },)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatasetDict({\n",
       "    train: Dataset({\n",
       "        features: ['quiz', 'names', 'knight_knave', 'solution', 'solution_text', 'solution_text_format', 'cot_head', 'cot_repeat_steps', 'cot_foot', 'statements', 'index'],\n",
       "        num_rows: 200\n",
       "    })\n",
       "    test: Dataset({\n",
       "        features: ['quiz', 'names', 'knight_knave', 'solution', 'solution_text', 'solution_text_format', 'cot_head', 'cot_repeat_steps', 'cot_foot', 'statements', 'index'],\n",
       "        num_rows: 100\n",
       "    })\n",
       "})"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "kk_dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Downloading data: 100%|██████████| 146k/146k [00:00<00:00, 2.16MB/s]\n",
      "Generating train split: 100 examples [00:00, 17525.92 examples/s]\n"
     ]
    }
   ],
   "source": [
    "train_ds = datasets.load_dataset('K-and-K/perturbed-knights-and-knaves',data_files=\"test/random_pair/people2_num100.jsonl\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Dataset({\n",
       "    features: ['quiz', 'names', 'knight_knave', 'solution', 'solution_text', 'solution_text_format', 'cot_head', 'cot_repeat_steps', 'cot_foot', 'statements', 'index'],\n",
       "    num_rows: 5\n",
       "})"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train_ds['train'].select(range(5))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "kk",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.19"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
